package com.rui.study.algorithm;


import java.net.URLDecoder;
import java.net.URLEncoder;
import java.util.Map;

public class PrintUtil {


    private static void printSystemProperties() {
        for (Map.Entry entry : System.getProperties().entrySet()) {
            if (String.valueOf(entry.getKey()).contains("user")) {
                System.out.println(entry.getKey() + " --> " + entry.getValue());
            }
        }
    }

    private static void printSystemEnv() {
        for (Map.Entry entry : System.getenv().entrySet()) {
            if (String.valueOf(entry.getKey()).contains("USER")) {
                System.out.println(entry.getKey() + " --> " + entry.getValue());
            }
        }
    }

    public static void print(Object obj) {
        System.out.println(JsonUtil.encode(obj));
    }

    public static void main(String[] args) {
//        System.out.println(-294967296l - 2000000000l);

        System.out.println(URLEncoder.encode("com.rui.study.micro.gateway"));
//        System.out.println(URLDecoder.decode("https://open.weixin.qq.com/connect/qrconnect?appid=wx3a80b32b633a92e8&scope=snsapi_login,snsapi_userinfo&redirect_uri=http%3A%2F%2F172.16.3.21%3A11000%2Fpublic%2F%23%2Flogin%2Ftransfer-page%3Fjump%3Dwx&state="));
//        System.out.println(URLDecoder.decode("https://api.weibo.com/oauth2/authorize?client_id=3174652650&redirect_uri=http%3A%2F%2F172.16.3.21%3A11000%2Fpublic%2F%23%2Flogin%2Ftransfer-page%3Fjump%3Dwb&response_type=code&forcelogin=true"));

    }
}
